function validateToken(req,res,next){
    // console.log(req.body);
    // console.log(req.headers.token);
    var token = req.headers.token;
    if(token){
        var data = verifyToken(token);
        console.log(2222, data);
        if(data){
            next();
        }else{
            res.json({
                status:false,
                message:"token过期,请重新登录",
            })
        }
    }else{
        res.json({
            status:false,
            message:"非法访问",
        })
    }
}

module.exports = {
    validateToken
}